package logic;

import java.util.Comparator;

import data.MovieTuple;

public class MovieDefaltComparator implements Comparator<MovieTuple> {

	public int compare(MovieTuple arg0, MovieTuple arg1) {
		int cmp=(-1)*(new Double(arg0.get_rating()).compareTo(new Double(arg1.get_rating()))) ;
		if (cmp==0)
			return arg0.get_name().compareTo(arg1.get_name());
		return cmp;
	}

}
